<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>图书首页</title>
</head>
<body>
<form action="">
	<table align="center" width="600px">
		<tr>
			<th>图书姓名：</th>
			<th>图书价格：</th>
			<th>图书图片：</th>
			<th>图书浏览量：</th>
			<th>删除图书</th>
		</tr>
		{% for book in pages.items %}
			<tr>
				<th>{{ book.name }}</th>
				<th>{{ book.price | yuan }}</th>
				<th><img src="{{ book.pic }}" width="20%"></th>
				<th>{{ book.count }}</th>
				<th><a href="/deletebook?id={{ book.id }}">删除</a></th>
			</tr>
		{% endfor %}
		<tr>
			<th colspan="4">
				{% if pages.has_prev %}
					<a href="bookslist?pag_num={{ pages.prev_num }}">上一页</a>
				{% endif %}
				{% for page in pages.iter_pages() %}
					<a href="bookslist?pag_num={{ page }}">{{ page }}</a>
				{% endfor %}
				{% if pages.next_num %}
					<a href="bookslist?pag_num={{ pages.next_num }}">下一页</a>
				{% endif %}
			</th>
		</tr>
	</table>
</form>
</body>
</html>